<html>
<head><meta charset="utf-8"><title>tidy should not traverse untracked directories #69291 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html">tidy should not traverse untracked directories #69291</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189255916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189255916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189255916">(Feb 27 2020 at 20:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> what do you think of PR <a href="https://github.com/rust-lang/rust/issues/69527" target="_blank" title="https://github.com/rust-lang/rust/issues/69527">#69527</a> ?</p>



<a name="189257421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257421">(Feb 27 2020 at 21:10)</a>:</h4>
<p>hm</p>



<a name="189257486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257486">(Feb 27 2020 at 21:10)</a>:</h4>
<p>if it works I'm all for it I think</p>



<a name="189257495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257495">(Feb 27 2020 at 21:10)</a>:</h4>
<p>the only problem I could imagine with this strategy</p>



<a name="189257498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257498">(Feb 27 2020 at 21:10)</a>:</h4>
<p>presuming it's not a massive slowdown?</p>



<a name="189257504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257504">(Feb 27 2020 at 21:10)</a>:</h4>
<p>is if you add a <em>lot</em> of untracked files</p>



<a name="189257573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257573">(Feb 27 2020 at 21:11)</a>:</h4>
<p>then presumably we'll do some amount of unnecessary work</p>



<a name="189257582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257582">(Feb 27 2020 at 21:11)</a>:</h4>
<p>eh, I think it's probably not too bad</p>



<a name="189257592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257592">(Feb 27 2020 at 21:11)</a>:</h4>
<p>I'm going to approve it</p>



<a name="189257641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257641">(Feb 27 2020 at 21:12)</a>:</h4>
<p>I too expect that this will <em>not</em> matter in practice. Especially since I'm <strong>not</strong> doing <code>git status --untracked=all</code>.</p>



<a name="189257673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257673">(Feb 27 2020 at 21:12)</a>:</h4>
<p>Did you consider</p>
<div class="codehilite"><pre><span></span>       files. Because it takes extra work to find untracked files in the filesystem, this
       mode may take some time in a large working tree. Consider enabling untracked cache
       and split index if supported (see git update-index --untracked-cache and git
       update-index --split-index), Otherwise you can use no to have git status return
       more quickly without showing untracked files.
</pre></div>



<a name="189257753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189257753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189257753">(Feb 27 2020 at 21:13)</a>:</h4>
<p>I guess if it's taking a long time we can presumably tell people to use that</p>



<a name="189260262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189260262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189260262">(Feb 27 2020 at 21:41)</a>:</h4>
<p>I was unaware of the <code>--untracked-cache</code> option. And yes, if someone actually complains about this in the wild, then we can put something in (e.g. emit a warning if the set of untracked files we add is huge)</p>



<a name="189261115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/tidy%20should%20not%20traverse%20untracked%20directories%20%2369291/near/189261115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/tidy.20should.20not.20traverse.20untracked.20directories.20.2369291.html#189261115">(Feb 27 2020 at 21:51)</a>:</h4>
<p>mhm. rustfmt is already pretty slow (mostly because we're running it on every file individually, I think, though unsure), so I think this is not that big a deal</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>